﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WPS.Code.Utils
{
    public class WPSFileUtils
    {
        public static readonly List<string> PictureExt = new List<string>() { "jpg","png","gif","bmp","jpeg"};
        
        /// <summary>
        /// 获取文件后缀名
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        public static string GetFileExt(string fileName)
        {
            string ext = "";
            if (fileName.LastIndexOf(".") > -1)
            {
                ext = fileName.Substring(fileName.LastIndexOf(".") + 1);
            }
            return ext;
        }
    }
}
